<template>
  <tables-browser
    :connection-id="connectionId"
    :database="database"
    :tables="tables"
  />
</template>

<script setup>
import { computed } from 'vue'
import TablesBrowser from '@/components/table/TablesBrowser.vue'

const props = defineProps({
  tab: {
    type: Object,
    required: true
  }
})

// 从标签页数据中提取所需属性
const connectionId = computed(() => props.tab.connectionId)
const database = computed(() => props.tab.data?.database || '')
const tables = computed(() => props.tab.data?.tables || [])
</script> 